import aiohttp
import time


async def request(url: str):
    async with aiohttp.ClientSession() as session:
        async with session.get(url) as response:
            return await response.read() if response.status == 200 else None


def printime(context: str, end=None):
    printime.context_max_length = max(printime.context_max_length, len(context))
    print("[%s] %s" % (time.strftime("%H:%M:%S", time.localtime()), context.ljust(printime.context_max_length)), end=end)


printime.context_max_length = 0
